package org.geek4j.repository;

import java.util.List;

import org.geek4j.domain.Person;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

/**
 * @author Geek4J
 * @description Repository rest
 */
@RepositoryRestResource(collectionResourceRel = "person", path = "person")
public interface PersonRepository extends PagingAndSortingRepository<Person, Long> {

	List<Person> findByName(@Param("name") String name);

	List<Person> findByAge(Integer age);
}